﻿#ifndef CMDCREATETHREEDSURFACEPLOT_H
#define CMDCREATETHREEDSURFACEPLOT_H

#include "CommandManager/CommandBase.h"

namespace PostCommand
{
    /// @brief 后处理保存图像命令
    class CmdCreateThreeDSurfacePlot : public CommandManager::CommandBase
    {
        Q_OBJECT

    public:
        CmdCreateThreeDSurfacePlot();
        ~CmdCreateThreeDSurfacePlot();

        bool execute() override;
        void undo() override;
        void redo() override;

        void setGraphType(int type) { m_graphType = type; }
        void setVariableIndex(int index) { m_variableIndex = index; }
        void setFrequencyIndex(int frequencyIndex) { m_frequencyIndex = frequencyIndex; }
        void setReaderIndex(int index) { m_readerIndex = index; }
        void setFilePath(const QString& path) { m_filePath = path; }
        void setName(const QString& name) { m_name = name; }
        void setGeometryFileName(const QString& geometryFileName) { m_geometryFileName = geometryFileName; }
        void setIsOpenNewWindow(bool isOpen) { m_isOpenNewWindow = isOpen; }

    private:
        int m_graphType{ 0 };
        int m_variableIndex{ 0 };
        int m_frequencyIndex{ 0 };
        int m_readerIndex{ 0 };
        QString m_filePath{};
        QString m_name{};
        QString m_geometryFileName{};
        bool m_isOpenNewWindow{ true };
    };
} // namespace PostCommand

#endif
